#ifndef _UART_CONFIG_H_
#define _UART_CONFIG_H_

#ifdef __cplusplus
    extern "C" {
#endif

#include <stdio.h>
#include <string.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "spi_flash_mmap.h"
#include "nvs_flash.h"
#include "driver/uart.h"
#include "driver/gpio.h"

#define TXD_PIN                     (GPIO_NUM_4)
#define RXD_PIN                     (GPIO_NUM_5)
#define DEFAULT_SCAN_LIST_SIZE      64
#define RX_BUF_SIZE                 1024

extern uint8_t rx_data[RX_BUF_SIZE+1];
extern uint8_t tx_data[RX_BUF_SIZE+1];


extern uint16_t number;
extern uint16_t ap_count, ap_index;
extern wifi_ap_record_t ap_info[DEFAULT_SCAN_LIST_SIZE];

int uart_send(const char* data);
void uart_init_config(void);

void wifi_init(void);
void wifi_scan(void);
void wifi_connect(char* ssid, char* password);



#ifdef __cplusplus
    }
#endif

#endif


